﻿<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<a href="/shoparticle.mrqa?action=exchangelist">返回</a>
<br>
<span class="title1">兑换礼品</span>
<table class="qlist" width="100%" align="center" cellpadding="0" cellspacing="0" style="background-color:#FAFCFC;border:1px solid #ccc;">
    <html:form action="/shoparticle" method="post" onsubmit="return validate(this);" enctype="multipart/form-data">
    <html:hidden property="action" value="exchange"/>
    <html:hidden property="id" />
    <tr>
        <td align="right">真实姓名</td>
        <td>
            <html:text property="realName" size="60" maxlength="10"/>
        </td>
    </tr>
    <tr>
        <td align="right">联系电话</td>
        <td>
        	<html:text property="telephone" size="60" maxlength="15"/>
        </td>
    </tr>
    <tr>
    	<td align="right">公司名称</td>
    	<td><html:text property="company" size="60" maxlength="20"/></td>
  	</tr>
  	<tr>
    	<td align="right">邮寄地址</td>
    	<td><html:text property="postAddr" size="60" maxlength="45"/></td>
  	</tr>
  	<tr>
    	<td align="right">邮政编码</td>
    	<td><html:text property="postCode" size="6" maxlength="10"/></td>
  	</tr>
  	<tr>
    	<td align="right">电子邮箱</td>
    	<td><html:text property="email" size="60" maxlength="30"/></td>
  	</tr>
    <tr>
    	<td align="right">验证码</td>
        <td>
            <input type="text" name="vc" value="" size="8">*(输入右边图片上的数字)<img src="<%=request.getContextPath()%>/vcimg" width="40" height="20" border="0"/>&nbsp;&nbsp;&nbsp;<input type="submit" value="兑换"/>
        </td>
    </tr>
    <tr>
    	<td>&nbsp;</td><td></td>
  	</tr>
    <tr>
    	<td align="right"><font color="red">备注：</font></td>
    	<td><font color="red">礼品的配送按每月两次统一发送。</font></td>
    </tr>
    </html:form>
</table>
<script type="text/javascript">
    function validate(pForm)
    {
        var realName = pForm.realName.value;
        if(realName == "")
        {
            alert("[真实姓名]必须");
            pForm.realName.focus();
            return false;        
        }
        var telephone = pForm.telephone.value;
        if(telephone == "")
        {
            alert("[联系电话]必须");
            pForm.telephone.focus();
            return false;        
        }
        var postAddr = pForm.postAddr.value;
        if(postAddr == "")
        {
            alert("[邮寄地址]必须");
            pForm.postAddr.focus();
            return false;        
        }
        var postCode = pForm.postCode.value;
        if(postCode == "")
        {
            alert("[邮政编码]必须");
            pForm.postCode.focus();
            return false;        
        }
        var email = pForm.email.value;
        if(email == "")
        {
            alert("[电子邮箱]必须");
            pForm.email.focus();
            return false;
        }
        return true;
    }
</script>